<?php
/**
 * 
 * Contact Grouping DropList
 * 
 * @return Fox\Html\DropList
 */
use Fox\Html\DropList;
use Hive\Ressource\Group;

$authCheck = isset($params['authorizationCheck']) ? $params['authorizationCheck'] : true;
$xview = Xview::instance();
$grouping = User::current()->group();

$finder = new Group();
$groups = $finder->find();

$dp = new DropList(array('contact_group','grouping'),false,false,false,$grouping);
$dp->options($groups,'grouping','name');
if(!Fox\Authorization\Manager::check(Hive\Ressource::AUTH_GROUP_CAN_CHG) && $authCheck) {
	$dp->input(false);
}
return $dp;